package com.ami12.shopping.service.impl;

import com.ami12.shopping.mapper.ItemMapper;
import com.ami12.shopping.pojo.Item;
import com.ami12.shopping.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * Created by zhangzejun .
 * time: 2016/12/8  9:16
 */
public class ItemServiceImpl implements ItemService {
    @Autowired
    private ItemMapper itemMapper;

    public List<Item> selectAll() throws Exception {
        return itemMapper.selectAll();
    }

    public Item selectByPrimaryKey(Integer id) throws Exception{
        return itemMapper.selectByPrimaryKey(id);
    }

    public Boolean updateByPrimaryKey(Item item) throws Exception {
        return itemMapper.updateByPrimaryKey(item);
    }
}
